<template>
  <el-row justify="center" style="margin-top: 20px; margin: 50px">
    <el-space wrap>
      <el-button type="success" @click="add">新增喂养点信息</el-button>
    </el-space>
  </el-row>
  <el-row justify="center" style="margin-top: 20px; margin: 60px">
    <el-table
      :data="tableData"
      style="width: 50%"
      :row-class-name="tableRowClassName"
      border
      stripe
    >
      <el-table-column label="喂养点照片" width="180">
        <template #default="scope">
          <el-image style="width: 100px; height: 100px" :src="scope.row.avatar" />
        </template>
      </el-table-column>
      <el-table-column prop="address" label="地址" width="200" />
      <el-table-column prop="other_descriptions" label="其他描述" />
    </el-table>
  </el-row>
</template>
<script setup>
import { ElMessage } from 'element-plus'
import { ref } from 'vue'
import feed1 from '../../assets/feed1.jpg'
import feed2 from '../../assets/feed2.jpg'
const input = ref('')
const tableData = ref([
  {
    avatar: feed1,
    address: '广西南宁',
    other_descriptions: '无'
  },

  {
    avatar: feed2,
    address: '广州中山',
    other_descriptions: '无'
  }
])
import router from '@/router'
const add = () => {
  router.push({ path: '/pet6' })
}
</script>
